NodeCopy Method

Copies a Node object and optionally it's child nodes from one parent  Node object to another  Node object in the TreeView control.

Syntax

object.NodeCopy(DestNode, SrcNode, IncludeChildren)

The NodeCopy Method syntax has these parts:

Part Description
object Required. An object expression that evaluates to an object in the Applies To list.
DestNode Required. A valid Node (MSComctlLib.Node) object.
SrcNode Required. A valid Node (MSComctlLib.Node) object.
IncludeChildren Optional. A boolean value or constant that specifies whether to include child Node objects in the copy operation, as described in settings.

Settings

The settings for NodeCopy Method are:

Setting Description
True Operation was successful.
False Operation failed. (Trap the Err object for error condition)

The settings for IncludeChildren operator are:

Setting Description
True Copy all child Node objects that are associated with SrcNode.
False Copy only the SrcNode.

Remarks

Due to the complex nature of copying nodes and key generation, this method requires assistance to complete the process. Therefore the actual creation of the new node is passed out of the class by raising the CopyNode event. This event has a bCancel parameter that can be passed back to abort the copying process if required.